package com.funny.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author fanxiao  2021/7/30
 * @since 1.0.0
 */
public class TestObjectHandler implements InvocationHandler {

	private Object target;

	public TestObjectHandler(Object target) {
		this.target = target;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("---");
		Object invoke = method.invoke(target, args);
		System.out.println("---");
		return invoke;
	}
}
